The present invention relates to a method and apparatus for edge enhancement in digital images. In particular, the invention provides an image processing technique that provides an improved image with enhanced edge sharpness.
Digital image capture and processing is an important technology because it provides for the easy sharing of images over a computer network. In order to provide a high quality image, the edges of objects within the image should be sharp. One problem that has persisted in digital capture devices (e.g. cameras) is in the charge coupled devices (CCD) that are used to capture the image. Sometimes the CCDs will not function properly or will give erroneous data. This is sometimes considered a missing pixel. In such cases, conventional capture devices provide erroneous image data to the display device and a distorted image is reproduced. Accordingly, a technique of overcoming the missing pixel problem is desirable.
Further, edge enhancement is a very desirable feature in digital and personal computer (PC) cameras. However, the quality of a reconstructed image from digital cameras is usually lower than that of a regular camera. This is due at least in part to the lower resolution and quality of the CCDs used in the camera. Consequently, edge enhancement increases the sharpness of the output image and provides users a better viewing experience.
There are two keys to a successful edge enhancement technique. One is to correctly locate the edges, and the second is to avoid artifacts when the edges are enhanced. The present invention provides a technique that efficiently performs both of these steps and overcomes the limitations identified in the conventional digital cameras.
The invention overcomes the identified limitations and provides an improved image edge enhancement technique. An exemplary embodiment of the invention is an apparatus for edge enhancement of a digital image provided as raw digital image data to an input terminal and for providing processed image data to an output terminal. An offset processing circuit is coupled to the input terminal and configured to receive the raw data and generate offset data. An interpolation circuit is coupled to the offset processing circuit and configured to receive the offset data and to provide interpolated data. A color processing circuit is coupled to the interpolation circuit and configured to process the interpolated data to generate color data. An edge enhancement circuit is coupled to the interpolation circuit and the color processing circuit and configured to enhance the edges of the image based on the interpolated data and the color data to generate enhanced data. A lookup table is coupled to the color processing circuit and the edge enhancement circuit and configured to lookup the color data and the enhanced data to generate lookup data. A conversion circuit is coupled to the lookup table circuit and configured to convert the lookup data to generate the processed image data to the output terminal. In one aspect of the invention the processing is performed with RGB data, and in another aspect of the invention the processing is performed with YUV data.
In another embodiment of the invention the edge enhancement circuit includes an edge extraction circuit, a cut-off level adjustment circuit and an edge gain scaling circuit. These circuits are used to define the edge of objects in the image and to enhance their respective edges.
In another embodiment of the invention, the image capture device includes a circuit for implementation of a missing pixel interpolation in a progressive RGB type CCD. The purpose of this implementation is to (a) reconstruct a full resolution RGB color image, (b) offset some of the CCD dark-bright-dark-bright patterns in green pixels due to the neighboring red/blue color filter coatings in alternative lines, (c) absorb down sampling from back-end to front-end (otherwise, additional line memory after interpolation is needed to perform vertical down sampling), and (d) provide each pixel a 3xc3x973-pixel block for later edge enhancement.
Advantages of the present invention include correctly locating object edges, and avoiding artifacts when the edges are enhanced. Consequently, the invention provides an improved image edge enhancement technique over conventional edge processors.